<template>
  <div style="padding: 45px 0">
    <MyHeader title="拼嘻嘻购物车案例"></MyHeader>
    <MyGoods v-for="item in list" :key="item.id" :list="item"> </MyGoods>
    <MyFooter :list="list"></MyFooter>
  </div>
</template>

<script>
import MyHeader from './components/MyHeader.vue'
import MyGoods from './components/MyGoods.vue'
import MyFooter from './components/MyFooter.vue'
export default {
  name: 'Day05App',

  components: {
    MyHeader,
    MyGoods,
    MyFooter
  },
  data() {
    return {
      list: []
    }
  },
  created() {
    this.$axios({
      url: '/api/cart'
    }).then((res) => {
      console.log(res.data.list)
      this.list = res.data.list
    })
  },
  mounted() {},

  methods: {}
}
</script>

<style lang="scss" scoped></style>
